# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>

pkgname=xdg-desktop-portal-gnome
pkgver=44.1
pkgrel=2
pkgdesc="A backend implementation for xdg-desktop-portal for the GNOME desktop environment"
url="https://gitlab.gnome.org/GNOME/xdg-desktop-portal-gnome"
arch=(x86_64)
license=(LGPL)
depends=(
  gnome-desktop-4
  gnome-keyring
  libadwaita
  'xdg-desktop-portal-gtk>=1.10.0-2'
)
makedepends=(
  git
  meson
  xdg-desktop-portal
)
optdepends=('evince: Print previews')
provides=(xdg-desktop-portal-impl)
conflicts=('xdg-desktop-portal-gtk<1.10.0-2')
replaces=('xdg-desktop-portal-gtk<1.10.0-2')
groups=(gnome)
_commit=89203bf3522556965fc225782d1a635afdac611e  # tags/44.1^0
source=("git+https://gitlab.gnome.org/GNOME/xdg-desktop-portal-gnome.git#commit=$_commit")
b2sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/[^-]*-g/r&/;s/-/+/g'
}

prepare() {
  cd $pkgname
}

build() {
  arch-meson $pkgname build
  meson compile -C build
}

check() {
  meson test -C build --print-errorlogs
}

package() {
  meson install -C build --destdir "$pkgdir"
}

# vim:set sw=2 sts=-1 et:
